package com.tuliyou.request;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

/**
 * 更新当前登录用户信息的请求参数
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UpdateCurrentRequest {

    @Email(message = "邮箱格式不正确")
    @Length(max = 100, message = "邮箱长度不能超过100个字符")
    private String email;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;

    @Min(value = 0, message = "高考总分不能为负数")
    @Max(value = 750, message = "高考总分不能超过750分")
    private Integer examScore;

    @Min(value = 1, message = "省份排名不能小于1")
    private Integer provinceRank;
}